home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / xml4j.jar / com / ibm / xml / parser / StylesheetPI.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-08-30  |  2.3 KB  |  56 lines

  1. package com.ibm.xml.parser;
  2.  
  3. public class StylesheetPI extends TXPI {
  4.    static final long serialVersionUID = -5551516051977603120L;
  5.    public static final String S_XMLSTYLESHEET = "xml:stylesheet";
  6.    public static final String S_XMLALTSTYLESHEET = "xml:alternate-stylesheet";
  7.    public static final String S_STYLESHEET = "stylesheet";
  8.    public static final String S_ALTSTYLESHEET = "alternate-stylesheet";
  9.    public static final String S_TEXTCSS = "text/css";
  10.    String type;
  11.    String hrefURI;
  12.    String title;
  13.  
  14.    public StylesheetPI(String var1) {
  15.       this("xml:stylesheet", " type=\"text/css\" href=\"" + var1 + "\"", "text/css", var1, (String)null);
  16.    }
  17.  
  18.    public StylesheetPI(String var1, String var2, String var3) {
  19.       this("xml:stylesheet", var3 == null ? " type=\"" + var1 + "\" href=\"" + var2 + "\"" : " type=\"" + var1 + "\" href=\"" + var2 + "\" title=\"" + var3 + "\"", var1, var2, var3);
  20.    }
  21.  
  22.    public StylesheetPI(String var1, String var2, String var3, String var4) {
  23.       this(var1, var4 == null ? " type=\"" + var2 + "\" href=\"" + var3 + "\"" : " type=\"" + var2 + "\" href=\"" + var3 + "\" title=\"" + var4 + "\"", var2, var3, var4);
  24.    }
  25.  
  26.    public StylesheetPI(String var1, String var2, String var3, String var4, String var5) throws LibraryException {
  27.       super(var1, var2);
  28.       if (!var1.equals("xml:stylesheet") && !var1.equals("xml:alternate-stylesheet")) {
  29.          throw new LibraryException("Invalid stylesheet declaration detected.");
  30.       } else {
  31.          this.type = var3;
  32.          this.hrefURI = var4;
  33.          this.title = var5;
  34.       }
  35.    }
  36.  
  37.    public synchronized Object clone() {
  38.       ((Child)this).checkFactory();
  39.       StylesheetPI var1 = super.factory.createStylesheetPI(super.name, super.data, this.type, this.hrefURI, this.title);
  40.       ((Child)var1).setFactory(((Child)this).getFactory());
  41.       return var1;
  42.    }
  43.  
  44.    public String getType() {
  45.       return this.type;
  46.    }
  47.  
  48.    public String getHref() {
  49.       return this.hrefURI;
  50.    }
  51.  
  52.    public String getTitle() {
  53.       return this.title;
  54.    }
  55. }
  56.